package com.hl.wechat.demo.websocket;

import com.hl.wechat.demo.entity.User;
import com.hl.wechat.demo.message.WebSocketMessageEntity;

import javax.websocket.Session;
import java.util.List;

public interface IWebSocket {

    public void addUser(String id, Session session);

    public void remove(String id);

    public void sendMessage(WebSocketMessageEntity entity);

    public void broadcastMessage(User user,String msg);

    public List<Session> listSocketSession();

    public List<String> listSessionId();

    public User buildSystemUser();

    public boolean isOnline(String openId);
}
